########################################################################
# remove.sh - gmould removal script
# Copyright (C) 2013 Mohamad Afifi Omar <afifio@gmail.com>
#
# These comments cannot be remove or edited and should remain intact
# because this file comments is an extension to the GPL3 license.
# This software file is covered by GPL version 3 license.
# Please see the LICENSE and gpl3.txt or gpl3.htm in doc directory
# for the license agreement, if its not exist, write to the 
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Modification below this line is allowed
########################################################################
# Extra credits to:
#
########################################################################
# Notes:
# 
########################################################################
ROOT_UID=0             # Root has $UID 0.
if [ "$UID" -ne "$ROOT_UID" ]
then
	echo "Must be root to run this script."
	exit $E_NOTROOT
elif [ "$UID" = "$ROOT_UID" ]
then
	# systemwide removal

	PATHNOW=`pwd`
	INSTALLPATH=/usr/share/gmould
	CONFIGPATH=$HOME/.config/gmould
	RM="rm -rf"
	echo "Start removing files..."
	$RM $INSTALLPATH
	$RM $CONFIGPATH
	$RM /usr/bin/gmould
	$RM /usr/bin/gmouldnewproject
	$RM /usr/local/bin/gmould
	$RM /usr/local/bin/gmouldnewproject
	$RM /usr/local/apps/gmould
	$RM /usr/share/icons/gmould*.*
	$RM /usr/local/apps/gmould/.DirIcon
	$RM /usr/local/lib/X11/pixmaps/gmould.svg
	$RM /usr/share/pixmaps/gmould.svg
	$RM /usr/share/applications/gmould.desktop
	$RM /usr/share/doc/gmould
	echo "gmould removal complete, gMould library kept for use by other application."
fi

